package com.xujie.sportsmeeting.dto;

import jakarta.validation.constraints.*;
import lombok.Data;

/**
 * 运动员数据传输对象
 */
@Data
public class AthleteDTO {
    
    @NotBlank(message = "学号不能为空")
    @Size(min = 8, max = 20, message = "学号长度在8到20个字符")
    private String studentNumber;
    
    @NotBlank(message = "姓名不能为空")
    @Size(min = 2, max = 20, message = "姓名长度在2到20个字符")
    private String realName;
    
    @NotNull(message = "性别不能为空")
    @Min(value = 0, message = "性别值不正确")
    @Max(value = 1, message = "性别值不正确")
    private Integer gender;
    
    @NotNull(message = "年龄不能为空")
    @Min(value = 16, message = "年龄必须在16-35岁之间")
    @Max(value = 35, message = "年龄必须在16-35岁之间")
    private Integer age;
    
    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = "^1[3456789]\\d{9}$", message = "请输入正确的手机号")
    private String phone;
    
    @Email(message = "请输入正确的邮箱地址")
    private String email;
    
    @NotBlank(message = "院系不能为空")
    private String department;
    
    @NotBlank(message = "班级不能为空")
    private String className;
    
    @NotNull(message = "身高不能为空")
    @DecimalMin(value = "140.0", message = "身高必须在140-220cm之间")
    @DecimalMax(value = "220.0", message = "身高必须在140-220cm之间")
    private Double height;
    
    @NotNull(message = "体重不能为空")
    @DecimalMin(value = "40.0", message = "体重必须在40-150kg之间")
    @DecimalMax(value = "150.0", message = "体重必须在40-150kg之间")
    private Double weight;
    
    @Size(max = 200, message = "专项描述长度不能超过200个字符")
    private String specialty;
    
    @NotNull(message = "状态不能为空")
    private Integer status;
}
